﻿using static System.Console;

Dictionary<string, int> dict = new Dictionary<string, int>();
dict.Add("tom", 34);
dict.Add("kebi", 30);
dict.Add("james", 27);

foreach (KeyValuePair<string, int> keyValuePair in dict)
{
    WriteLine(keyValuePair.Key + " " + keyValuePair.Value);
}

dict.Remove("tom");
WriteLine(dict.First());
WriteLine(dict.Last());

ReadLine();